const router = require('koa-router')()

router.prefix('/users')

// 查数据
router.get('/', function (ctx, next) {
  ctx.body = 'this is a users response!'
})
router.get('/get', function (ctx, next) {
  ctx.body = 'this is a users response!'
})

// 增加
router.post('/post', function (ctx, next) {
  ctx.body = 'add data'
})

// 更新数据
router.post('/put', function (ctx, next) {
  ctx.body = 'update data'
})
//  删除数据
router.post('/delete', function (ctx, next) {
  ctx.body = 'del data'
})

module.exports = router
